﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Theme="SkinFile"
CodeBehind="NationalTeamsCurrentMatches.aspx.cs" Inherits="Nivdal.NationalTeamsCurrentMatches" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="basic_element">
    <div class="red_title_no_padding">
    <div class="grey_title_inside_red floater">
        <asp:Label ID="LitOfMatcheTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_Matches %>" CssClass="team_name_white"></asp:Label>
    </div>
    <div class="grey_title_triangle floater"></div>
        <div class="antifloater">
            <asp:Image ID="AddSelectedToLiveImage" ImageUrl="~/Images/Icons/LiveDetails.png" runat="server"        
            AlternateText="Live" ToolTip="<%$ Resources:Resource, Global_AddSelectedMatchesToLive %>" />
            <asp:LinkButton ID="AddSelectedMatchesToLiveButton" runat="server" SkinID="WhiteTitleLink"
             Text="<%$ Resources:Resource, Global_AddSelectedMatchesToLive %>" OnClick="AddSelectedToLive"></asp:LinkButton>         
        </div>
        <div class="clearBoth"></div>
    </div>
    <div class="padding5">
        <asp:GridView ID="NationalTeamsMatchesGridview" runat="server" SkinID="Professional" DataSourceID="NationalTeamMatchesDataSource"
         AutoGenerateColumns="false" AllowPaging="true" PageSize="50" OnRowCommand="AddToLive">
            <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
                Mode="NumericFirstLast" PageButtonCount="10" Position="Bottom" />
            <PagerStyle CssClass="pagination" HorizontalAlign="Center" /> 
            <Columns>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Date %>" ItemStyle-Width="15%">
                    <ItemTemplate>
                        <asp:Label ID="DateLabel" runat="server" SkinID="GridLabel" Text='<%# Eval("Date") %>'></asp:Label>
                    </ItemTemplate>                
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="65%">
                    <ItemTemplate>
                        <asp:HyperLink ID="MatchLink" runat="server" NavigateUrl='<%# "~/MatchPage.aspx?MatchId=" + Eval("MatchId") %>'
                         Text='<%# Eval("HomeTeamName") + " - " + Eval("AwayTeamName") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Result %>" ItemStyle-Width="10%">
                    <ItemTemplate>
                        <asp:Label ID="ResultLabel" runat="server" SkinID="GridLabel" Text='<%# Eval("Result") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="10%">
                    <ItemTemplate>
                        <asp:Panel ID="AddToLivePanel" runat="server" Visible='<%# Eval("CanBeAddedToLive") %>'>
                            <asp:ImageButton ID="AddToLiveButton" runat="server" ImageUrl="~/Images/Icons/LiveDetails.png"
                             CommandName="AddToLive" CommandArgument='<%# Eval("MatchId") %>' ToolTip="<%$ Resources:Resource, Live_AddMatchToLiveText %>" />
                            <asp:CheckBox ID="AddLiveCheckBox" runat="server" />
                            <asp:HiddenField ID="MatchIdHiddenField" runat="server" Value='<%# Eval("MatchId") %>' />
                        </asp:Panel>
                    </ItemTemplate>
                </asp:TemplateField>

            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="NationalTeamMatchesDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetNationalTeamsMatchesForLive" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
    </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, NationalTeamsMatches_PageTitle %>" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>
